MODULE error
  !-----------------------------------------------------------
  ! Error handling routine for the KRUUNUNHAKA basis set tool kit
  !-----------------------------------------------------------
  ! See CHANGELOG
  !-----------------------------------------------------------
  ! Copyright (C) 2003-2008 Pekka Manninen, 2010 Jussi Lehtola
  !
  ! This program is distributed under the terms of the GNU General
  ! Public License as published by the Free Software Foundation;
  ! either version 2 of the License, or (at your option) any later version.
  !
  ! This program is distributed in the hope that it will be useful,
  ! but WITHOUT ANY WARRANTY; without even the implied warranty of
  ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
  !
  ! Please note that this program as well as its 
  ! author must be properly cited whenever the program or some parts 
  ! originated on it are employed. 
  !
  !-----------------------------------------------------------

  USE textutil
  IMPLICIT NONE
CONTAINS

  SUBROUTINE error_stop(str)
    IMPLICIT NONE
    CHARACTER(LEN=*), INTENT(IN) :: str
    ! Stop program due to error
    CALL print_vertbar('!')
    CALL print_centerbar(str,'!')
    CALL print_vertbar('!')
    STOP
  END SUBROUTINE ERROR_STOP
END MODULE error
